<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>门诊药房</title>
<script type="text/javascript" src="<c:url value='js/jquery.min.js'/>"></script>
<script type="text/javascript"
	src="<c:url value='js/jquery.easyui.min.js'/>"></script>
<script type="text/javascript"
	src="<c:url value='js/easyui-lang-zh_CN.js'/>"></script>
<script type="text/javascript"
	src="<c:url value='js/zjs_datagrid-scrollview.js'/>"></script>
<script type="text/javascript"
	src="<c:url value='js/zjs_datagrid-groupview.js'/>"></script>
<link rel="stylesheet" type="text/css"
	href="<c:url value='css/themes/default/easyui.css'/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value='css/themes/icon.css'/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value='css/zjs_outpatient_Pharmacy.css'/>">
<script type="text/javascript">
		$(function(){
			$(".link").click(function(){
				var url = $(this).attr("url");
				var text = $(this).attr("text");
				console.log(url);
				//先判断选项卡是否存在，存在，激活就行了
				if($("#tabs2").tabs("exists", text)){
					$("#tabs2").tabs("select", text);
					return;
				}
				//不存在，则打开
				//添加新选项卡
				var config = {
					title: text,
					href: url,
					closable: true
				};
				$("#tabs2").tabs("add", config);
			});
			
			//关闭当前的
			$("#close_a").click(function(){
				var tab = $('#tabs2').tabs('getSelected');
				var index = $('#tabs2').tabs('getTabIndex',tab);
				if(index != 0){
					$('#tabs2').tabs('close', index);
				}
			});
			
			//关闭所有的
			$("#close_all").click(function(){
				var tabs2 = $('#tabs2').tabs('tabs');
				for(var i = tabs.length - 1; i >= 1; i --){
					$('#tabs2').tabs('close', i);
				}
			});
		});
		
	
</script>
<style>
	.menzheng,.menzheng li{
		list-style: none;
		margin: 0px;
		padding-left: 2px;
	}
</style>
</head>
<body class="easyui-layout">   
    <div data-options="region:'north'" style="height:100px;"></div>   
    <div data-options="region:'south'" style="height:50px;"></div>   
    <div data-options="region:'west',title:'主菜单',split:true" style="width:150px;">
    	
		<div class="easyui-accordion" data-options="fit:true, border:false">
			<div data-options="title: '门诊药房管理'">
				<ul class="menzheng">
					<li><a url="to_drugStore" text="药房发药" class="link easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'"></a></li>
					<li><a url="to_drug_wareHouse" text="药品入库" class="link easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'"></a></li>
					<li><a url="to_drugInventory" text="药品盘点" class="link easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'"></a></li>
					<li><a url="to_role_list" text="药品损益" class="link easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'"></a></li>
					<li><a url="to_role_list" text="药房退药" class="link easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'"></a></li>
					<li><a url="to_role_list" text="药品调拨" class="link easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'"></a></li>
				</ul>
			</div>
			<div data-options="title: '住院药房管理'">
				
			</div>
			<div data-options="title: '药库管理'">
				
			</div>
		</div>
    	
    </div>   
    <div data-options="region:'center'">
    	
    	<div id="tabs2" class="easyui-tabs" data-options="
    		fit:true, border:false,
    		tools: '#tools'
    		">
    		<div data-options="title: '工作台'" id="work">
			</div>
    	</div>
    	
    	<div id="tools" style="border: none; border-bottom:1px solid rgb(149,184,231);">
    		<a id="close_a" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true"></a>
    		<a id="close_all" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"></a>
    	</div>
    </div>
</body>
</html>